package Demo;

public class Dog extends Animals{
    @Override
    public void setAge(int age) {
        super.setAge(age);
    }

    @Override
    public int getAge() {
        return super.getAge();
    }

    @Override
    public String getName() {
        return super.getName();
    }

    @Override
    public void setName(String name) {
        super.setName(name);
    }
    public void voice(){
        System.out.println("汪汪汪");
    }
    public void eat(){
        System.out.println("肉");
    }

    public static void main(String[] args) {
        Dog cat = new Dog();
        cat.setName("咪咪");
        cat.setAge(88);
        System.out.println(cat.getName());
        System.out.println(cat.getAge());
        cat.voice();
        cat.eat();
    }
}
